#include "mqpublish.h"
#include "easymqproducer.h"

using namespace util;

namespace MqPublish {
    //MqClient::CMQProducer  *_Mq = NULL;
    CEasyMqProducer _MqEasy;

    bool Init() {
        _MqEasy.load("Mq");
        return true;
    }

    void AddMsg(uint32_t devId, string msg) {
        string tmp = "{\"devid\":\"" + to_string(devId) + "\"," + msg + "}";
        //_Mq->Send(tmp);
        _MqEasy.produce(tmp);
    }
}